package com.seanliao.nav.common.domain.dto;

import com.seanliao.nav.common.domain.dto.valid.Add;
import com.seanliao.nav.common.domain.dto.valid.Edit;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

/**
 * 文章发布/编辑DTO
 */
@Data
public class ArticleDTO {

    /* id */
    @NotNull(groups = Edit.class, message = "id不能为空")
    private Long id;

    /* 标题 */
    @NotBlank(groups = Add.class, message = "标题不能为空")
    private String title;

    /* 内容 */
    @NotBlank(groups = Add.class, message = "内容不能为空")
    private String content;

    /* 标签 */
    @NotNull(groups = {Add.class, Edit.class}, message = "标签不可为null")
    private List<String> tagList;

    /* 私人 */
//    @NotNull(groups = Add.class)
//    private Boolean isPrivate;

    /* 锁定状态 */
    private Boolean isLock;

}
